package main

import (
	"dongfeng_project/controller"
	_ "dongfeng_project/cron"
	"dongfeng_project/middlewares"
	"dongfeng_project/orm"
	"fmt"
	"github.com/gin-gonic/gin"
	"log/slog"
)

func main() {
	defer orm.Close()
	app := gin.Default()
	middlewares.Register(app)
	controller.RegisterApi(app)
	err := app.Run(":8080")
	if err != nil {
		slog.Error(fmt.Sprint(err))
		return
	}
}
